<style>
#date-type{display:inline-block;}
#date-type a{display:inline-block;margin: 0px 10px;}
#date-type a span{background-color:#3891CA;color:#fff;padding:10px 30px;display:block;}
#date-search{float:right;display:inline-block;vertical-align: top;line-height:30px;}
#date-search b{font-size:18px;font-weight: 400;color:#3891CA;}

.n-table th{border-color:#F4F5F9!important;text-align: center!important;}
.n-table td{border-color:#fff!important;vertical-align:middle;text-align: center;}

</style>
<div style="border-bottom:1px solid #3891CA;">
	<div id="date-search">
		<form method="get" action="<?=n_url('mprank', 'rankWeekly')?>">
			统计截止：<?=date('m月d日 H时', $data['total']['ctime'])?> 
			文章<b>[<?=$data['total']['article_total']?>]</b>篇，
			阅读<b>[<?=round($data['total']['read_total']/10000)?>万]</b>次，
			点赞<b>[<?=round($data['total']['like_total']/10000)?>万]</b>次
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="">数据说明</a>

			<input type="hidden" name="category" value="<?=urlencode($data['category']['id'])?>">
			<select name="date">
			<?php foreach ($data['dates'] as $date):
				$stime = date('m月d日', $date);
				$etime = date('m月d日', $date + 6 * 24 * 3600);
			?>
			<option value="<?=date('Y-m-d', $date)?>" <?=$date == $data['date'] ? 'selected' : ''?>><?=$stime?>-<?=$etime?></option>
			<?php endforeach;?>
			</select>

			<button>提交</button>
			
		</form>
	</div>
	
	
	<div id="date-type">
		<a href="<?=n_url('mprank', 'rankDaily')?>"><span>日榜</span></a>
		<a href="<?=n_url('mprank', 'rankWeekly')?>"><span>周榜</span></a>

	</div>
</div>




<div style="margin-top:10px">
	<div style="float:left;width:200px;">

		<?php

		foreach($data['cateTree'] as $key=>$val){
		?>
			<div class="catetree-list">
				<?=$key?>
			</div>
			<div class="subcatetree-list">
			<?php
			foreach ($val as $key1=>$val1){
			?>
				<a href="<?=n_url('mprank', 'rankWeekly', ['cid' => $val1['id'], 'date' => date('Y-m-d', $data['date'])])?>"<?=$data['category']['second_category']==$val1['second_category']?' class="cate-current"':''?>><?=$val1['second_category']?></a>
			<?php
			}
			?>
			</div>
		<?php
		}
		?>

	</div>
	<div style="margin-left:250px;">
		<dl class="n-box">
			<dt class="n-box-head">
				<b><?=$data['category']['second_category']?>排行榜</b>
				</dt>
			<dd class="n-box-body">

				<div class="n-sep-top">
					<?php n_mod('mprank')->rankTable($data, 'Y' ,'day');?>
				</div>
			</dd>
		</dl>

	</div>
</div>
